import {Component, Injectable, OnInit} from '@angular/core';
import {HighlightUtils, MarkdownUtils} from "../../projects/geminis-ng-dev/src/utils";
import {HttpClient} from "@angular/common/http";

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent implements OnInit {

  code = require(`!raw-loader!./app.component.ts`).default;
  md = require(`!raw-loader!./index.md`).default;

  codeHtml = HighlightUtils.highlight(this.code);
  mdHtml = MarkdownUtils.render(this.md);

  constructor(private http: HttpClient) {
  }

  ngOnInit(): void {
    this.http.post('/testData', {}).subscribe((resp) => {
      console.log(resp);
    }, error => {
      throw error;
    });
  }

}
